const axios = require('axios')
//推荐歌单
async function getSongs(classSongs) {
    var info = await axios({
        method: 'get',
        baseURL: 'http://jd.cctv005.com',
        url: '/top/playlist/highquality',
        port: 3000,
        params: {
            limit: 5,
            cat: classSongs
        }
    })
    return info
}

//新歌速递
async function getCourier(value) {
    var info = await axios({
        method: 'get',
        baseURL: 'http://jd.cctv005.com',
        url: '/top/song',
        port: 3000,
        params: {
            type:value
        }
    })
    return info
}

//独家放送
async function broadcast() {
    var info = await axios({
        method: 'get',
        baseURL: 'http://jd.cctv005.com',
        url: '/personalized/privatecontent',
        port: 3000
    })
    return info
}

//排行榜
async function ranking(number) {
    var info = await axios({
        method: 'get',
        baseURL: 'http://jd.cctv005.com',
        url: '/top/list',
        port: 3000,
        params: {
            idx:number
        }
    })
    return info
}
export default {
    getSongs,
    getCourier,
    broadcast,
    ranking
}